﻿namespace XBD.MyConsolePro
{

    class X
    {
        static public void Print()
        {
            Console.WriteLine("AAA");
        }
    }
    internal class Program
    {
        //主方法
        private static void Main(string[] args)
        {
            //Console.WriteLine("Hello world!");

            //System中IO操作Input、output
            /*  //Write和WriteLine区别
              Console.Write("welcome");
              Console.Write(" to");
              Console.Write(" C#");
              Console.WriteLine("");
              Console.WriteLine("welcome");
              Console.WriteLine(" to");
              Console.WriteLine(" C#");*/

            //int a = Console.Read();
            //Console.WriteLine(a);

            //获取键盘的值
            ConsoleKeyInfo b = Console.ReadKey();
            Console.WriteLine(b.Key);
            //Console.Read();
            //List<string> names = ["<name>", "Ana", "Felipe"];
            //foreach (var name in names)
            //{
            //    Console.WriteLine($"Hello {name.ToUpper()}!");
            //}
            //Console.WriteLine("Hello, World!");
            //Program pro = new Program();
            //Console.WriteLine(test());
            //ManualResetEvent manualResetEvent = new ManualResetEvent(false);
            /*
                初始化
             */
            //manualResetEvent.Reset();
            //Console.WriteLine("测试");
            /* if (manualResetEvent.WaitOne(2 * 1000)) 
                 {
                     Console.WriteLine("测试");
                     manualResetEvent.Set();
                 }*/

        }

        class MyClass
        {
            public void Excute()
            {
                Test();
            }
            private void Test()
            { }
        }

        /// <summary>
        /// 
        /// </summary>
        public int test()
        {
            int a = 3;
            #region
            if (a > 2)
            {
                Console.WriteLine("测试成功");
                return 3;
            }
            else

            {
                return 6;
            }
            #endregion
        }
    }
}